// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	12/16/2014 12:04:52 AM				
// -----------------------------

#ifndef _TerrainTextureGenerator_h
#define _TerrainTextureGenerator_h

#include "Common.h"

struct TerrainTextureElementDesc
{
	Color	Color;
	Float	Start;
};

struct TerrainTextureDesc
{
	UInt32								Width;
	UInt32								Height;
	UInt32								BlurSamples;
	Float*								HeightData;
	Float								MinOffset;
	Float								MaxOffset;
	Float								FadeBorder;
	vector<TerrainTextureElementDesc>	Elements;
};

class Application;

class TerrainTextureGenerator
{
public:

	static ITexture2D*		Generate(Application* lpApp, const TerrainTextureDesc& desc);

private:

	static Color			CalculateColor(const TerrainTextureDesc& desc, Float heightVal);

	TerrainTextureGenerator();
	~TerrainTextureGenerator();
	TerrainTextureGenerator(const TerrainTextureGenerator& refTerrainTextureGenerator);
	TerrainTextureGenerator& operator=(const TerrainTextureGenerator& refTerrainTextureGenerator);
};

#endif